package com.itec.learn.spring.aop;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * 日志代码与业务代码耦合
 * @author chenyiqun
 */
public class HelloSpeaker {
    private Logger logger = Logger.getLogger(getClass().getName());

    public void hello(String name){
        logger.log(Level.INFO,"hello method start....");
        System.out.println("Hello, " + name);
        logger.log(Level.INFO, "hello method end....");
    }

    public static void main(String[] args) {
        HelloSpeaker helloSpeaker = new HelloSpeaker();
        helloSpeaker.hello("Tony");
    }
}
